﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;

namespace shudiangis.Common
{
    public class ObjectTypeOperation
    {
        #region 获取Geometry对象类型
        /// <summary>
        /// 获取Geometry对象类型
        /// </summary>
        /// <param name="objGeometry"></param>
        /// <returns>"PolygonGeometry","BoundaryGeometry","GeometryCollection"</returns>
        public static string GetTypeOfObject(object objGeometry)
        {
            object strType;
            strType = objGeometry.GetType().InvokeMember("Type", BindingFlags.GetProperty, null,
                objGeometry, null);

            return strType.ToString();
        }
        #endregion
    }
}
